<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>产品档案登记复核</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/css/animate.css" rel="stylesheet">
    <link href="/css/style.css?v=4.1.0" rel="stylesheet">

    <link href="/bootstraptable/bootstrap-table.min.css" rel="stylesheet">
</head>
<body>
    <div style="color: #0e9aef;margin: 20px;">您正在做的业务是： 产品设计 -- 产品档案管理 -- 产品档案登记复核</div>
    <div style="margin-left: 20px">当前等待复核的产品档案总数：<span id="file_count_span"></span>例</div>
    <!--等待复核的产品档案-->
    <table id="file_review_table"></table>


<!-- 全局js -->
<script src="/js/jquery.min.js?v=2.1.4"></script>
<script src="/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/js/plugins/layer/layer.min.js"></script>

<!-- 自定义js -->
<script src="/js/hAdmin.js?v=4.1.0"></script>
<!--<script type="text/javascript" src="/js/index.js"></script>-->

<!-- 第三方插件 -->
<script src="/js/plugins/pace/pace.min.js"></script>

<!--BootstrapTable-->
<script src="/bootstraptable/bootstrap-table.min.js"></script>
<script src="/bootstraptable/locale/bootstrap-table-zh-CN.min.js"></script>

<script>
    $(function (){
        //获取等待审核的数量
        $.post("/design/file/reviewCount",function (res){
            $("#file_count_span").html(res)
        })
        //查询等待审核的数据
        $("#file_review_table").bootstrapTable({
            //请求方式
            method:"post",
            //内容类型：如果请求方式是post，内容类型必须是application/x-www-form-urlencoded
            contentType:"application/x-www-form-urlencoded",
            //请求路径
            url:"/design/file/review",
            // 数据行交替样式
            striped: true,
            // 是否是服务器端分页：server表示服务器端，client表示前端分页
            sidePagination: 'server',
            columns:[{
                title:"产品编号",
                field:"productId",
                sortable:true,
            },{
                title: "产品名称",
                field: "productName"
            },{
                title: "用途类型",
                field: "type",
                formatter:function (value, row, index){
                    if(row.type==="Y001-1")
                        return "商品"
                    else
                        return "物料"
                }
            },{
                title: "I级分类",
                field: "firstKindName"
            },{
                title: "II级分类",
                field: "secondKindName"
            },{
                title: "III级分类",
                field: "thirdKindName"
            },{
                title: "产品经理",
                field: "responsiblePerson"
            },{
                title: "复核",
                formatter: function (value, row, index) {
                    let obj ="<a href='javascript:review(" + row.id+ ")'>复核</a>"
                    return obj;
                }
            }]
        })
    })
    //点击复核按钮
    function review(id){
        localStorage.setItem("id",id)
        window.location="/design/design_file_review_queryUI"
    }
</script>
</body>
</html>